package org.lanqiao.tjut.controller;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.lanqiao.tjut.bean.UsersBean;
import org.lanqiao.tjut.bean.UsersBeanStu;
import org.lanqiao.tjut.myUtils.MyUtils;
import org.lanqiao.tjut.service.ServiceFactory;

public class UserInfoStuQuery extends HttpServlet{

	/**
	 * 
	 */
	
	private static final long serialVersionUID = 1L;

	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		//设置编码  防止中文乱码
		request.setCharacterEncoding("UTF-8");
		
		
		String strUnb=request.getParameter("Unumber");
		
		
		//获取需要显示的所有的数据集合
		List<UsersBeanStu> lstUsersStu = ServiceFactory.getUserInfoManagerStuServiceInstance().getAllUsersInfo(strUnb);
		//将需要显示的结果集放入session缓存中
		request.getSession().setAttribute("lstUsersStu", lstUsersStu);
		
		//清空request缓存中的对象
		request.removeAttribute("usersB");
		//转发到结果显示页面
		request.getRequestDispatcher("logined/UserInfoManager/userScore.jsp").forward(request, response);
		//response.sendRedirect("logined/UserInfoManager/userInfoAddDetail.jsp");
		
	}
	
}
